package com.etasist.beans;

/**
 * @author issa
 *
 */

public class Commands implements Comparable {
	
	public int commandID;

	public String command;

	public String getCommand() {
		return command;
	}

	public void setCommand(String command) {
		this.command = command;
	}

	public int getCommandID() {
		return commandID;
	}

	public void setCommandID(int commandID) {
		this.commandID = commandID;
	}

	  public int compareTo(Object anotherCommand) throws ClassCastException {
		    if (!(anotherCommand instanceof Commands))
		      throw new ClassCastException("A Commands object expected.");
		    int anotherCommandsID = ((Commands) anotherCommand).getCommandID(); 
		    return this.commandID - anotherCommandsID;    
		  }

}
